AMD/IOMMU: free more memory when cleaning up after error
authorJan Beulich <jbeulich@suse.com>
Mon, 22 Jul 2019 09:59:01 +0000 (11:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 22 Jul 2019 09:59:01 +0000 (11:59 +0200)
commit6ae22e7aac8fb0d39318eb27eab439dd97521174
tree81b04c7fe0101903b9dd48a01c5de7e9a48b3ff4
parentf7f7cd5c585ab2d6f4bbc17b8fbec52dde1a5715
AMD/IOMMU: free more memory when cleaning up after error

The interrupt remapping in-use bitmaps were leaked in all cases. The
ring buffers and the mapping of the MMIO space were leaked for any IOMMU
that hadn't been enabled yet.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Brian Woods <brian.woods@amd.com>
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/iommu_intr.c